package com.kx.game.center.global;

import com.kx.core.dawn.dbs.dao.DaoManager;
import com.kx.game.center.container.ServerConfiguration;
import com.kx.game.center.manager.*;
import com.kx.game.center.redis.RedisConstant;
import com.redis.core.RedisServer;
import com.redis.core.manager.RedisManager;
import com.redis.core.util.RedisKeyUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.annotation.WebListener;

@WebListener
public class GSServices {

    private static Logger logger = LoggerFactory.getLogger(GSServices.class);

    public static final RedisServer redisServer = new RedisServer("classpath:applicationContext.xml");

    public static final ServerConfiguration serverConfig = (ServerConfiguration) redisServer.getAc().getBean("playerContainer");

    public static final RedisManager redisManager = GSServices.redisServer.getRedisClient();

    public static final RedisConstant rsConstant = new RedisConstant();

    public static final RedisKeyUtil rsKeyUtil = new RedisKeyUtil();

    public static final DaoManager daoManager = new DaoManager();

    public static final LoadManager loadManager = new LoadManager();

    public static final UserManager userManager = new UserManager();

    public static final LoginManager loginManager = new LoginManager();

    public static final LocalManager localManager = new LocalManager();

    public static final GameServerManager gameManager = new GameServerManager();

    public static final GatewayManager gatewayManager = new GatewayManager();

    public static final NewFriendManager newFriendManager = new NewFriendManager();

}
